]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: fail cleanly if XFixesGetCursorImage fails
authorDan Winship <danw@gnome.org>
Wed, 3 Aug 2011 15:12:32 +0000 (11:12 -0400)
committerDan Winship <danw@gnome.org>
Wed, 3 Aug 2011 15:12:32 +0000 (11:12 -0400)
from Mageia, via Olav Vitters
https://bugzilla.gnome.org/show_bug.cgi?id=653119

src/shell-recorder.c
src/shell-xfixes-cursor.c

index 0171045de527a88b5771f032009397e8a09b99e9..9df14d3ea52d3dec6f4b1c473be831e1475bc2b6 100644 (file)
@@ -393,6 +393,8 @@ recorder_fetch_cursor_image (ShellRecorder *recorder)
     return;
 
   cursor_image = XFixesGetCursorImage (clutter_x11_get_default_display ());
+  if (!cursor_image)
+    return;
 
   recorder->cursor_hot_x = cursor_image->xhot;
   recorder->cursor_hot_y = cursor_image->yhot;
index 0da2397c666e6e5ebd0b8683c1f801e6b3f6eca1..6507d19a8c5149b21b03d2f085e15b9b9ef0ceb9 100644 (file)
@@ -202,6 +202,8 @@ xfixes_cursor_reset_image (ShellXFixesCursor *xfixes_cursor)
     return;
 
   cursor_image = XFixesGetCursorImage (clutter_x11_get_default_display ());
+  if (!cursor_image)
+    return;
 
   /* Like all X APIs, XFixesGetCursorImage() returns arrays of 32-bit
    * quantities as arrays of long; we need to convert on 64 bit */